Easy2Siksha Sample Paper
• Numeric input gives your program access to data from the user.
One works behind the scenes with memory addresses, the other works at the front desk,
talking to the user. But in both cases, you’re dealing with how information flows — either
from one part of the program to another, or from the outside world into your code.
2. Recursion – Denion, condions, factorial program / Fibonacci series
o Frequency: 4 mes
o Years Appeared: 2020, 2021, 2022, 2024
Ans: A Different Beginning – The Magic Mirror Story
Imagine you’re standing in front of two mirrors placed face-to-face. You look into one, and
you see yourself… inside another mirror… and another… and another… going on seemingly
forever.
Now imagine that instead of just reflecting your image, each “you” in the mirror is doing a
small part of a task — and then passing the rest of the work to the “you” in the next mirror.
Eventually, the last “you” finishes the smallest piece of the job and sends the result back
through all the mirrors until it reaches you.
That’s recursion in programming: A function that calls itself to solve a problem by breaking
it into smaller, similar problems — until it reaches a point where it can stop.
1. Definition of Recursion
In programming (and specifically in C), recursion is a technique where a function calls itself
directly or indirectly to solve a problem.
The idea is:
• Break a big problem into smaller sub-problems of the same type.
• Solve the smallest version directly (this is the base case).
• Combine results as the function calls “unwind”.
2. How Recursion Works – The Two Key Parts
Every recursive function has two essential parts:
1. Base Case (Stopping Condition)
o This is the condition under which the function stops calling itself.
o Without it, the function would keep calling itself forever, causing a stack
overflow error.